1. Field of the Invention
The present invention relates to a method of and a device for controlling objects in an information processing system.
Use of an object-oriented scheme is a common practice employed when implementing a data-transfer system, a switch system, etc. When there is a need to create an object, delete an object, and acquire attribute values of objects constituting a system, it becomes necessary to control relations between objects in the system.
2. Description of the Related Art
FIGS. 10A and 10B are illustrative drawings showing a tree model used for controlling of objects.
A containment tree as shown in FIG. 10A is widely used for controlling objects in a hierarchical fashion. In the example of FIG. 10A, objects B and E are located under an object A, and objects C and D are provided under the object B. The object E has objects F and G thereunder. The object F has no object attached thereto while the object G has an object H as a lower-level object attached thereto.
Tree information on the objects A through H having a tree structure described above is controlled by using a table as shown in FIG. 10B. The table stores each object and an indication of whether a given object has a lower-level object located thereunder. If there is a lower-level object, a name of the lower-level object is provided. For example, the table shows that the object A has the objects B and E thereunder, and that the object B has the objects C and D as lower-level objects. Further, the table shows that the objects C and D do not have any lower level objects attached thereto. When a client needs to acquire attribute values of an object or to make settings thereto, tree information as shown in FIG. 10B is used for manipulating a given object.
In the related-art object control, objects are controlled by using relations between upper-level objects and lower-level objects represented in such a manner as shown in FIG. 10B. In a worst scenario, however, all the entries in the table need to be searched for when the tree information is referred to in order to handle an object. Even when a searched object is found, there may be a case in which no handling is performed on that object. As a tree structure becomes more complex, time and labor for searching for an object increase. Because of this, it is difficult to enhance performance of object handling.
Accordingly, there is a need for optimizing a process of controlling objects and for enhancing an operation efficiency of the process.
Accordingly, it is a general object of the present invention to provide a method of and a device for controlling objects which can satisfy the need described above.
It is another and more specific object of the present invention to provide a method of and a device for controlling objects which can allow efficient handling of objects.
In order to achieve the above objects according to the present invention, a method of controlling objects in an information processing system includes the steps of representing objects by a tree having a hierarchical structure, providing each of the objects with a first operation-target flag which indicates whether a corresponding object is a target of a given operation, and performing the given operation on an object upon receiving of an object handling request for the given operation only if the first operation-target flag of the object indicates that the object is a target of the given operation.
If the objects are related with each other in the hierarchical structure such that the hierarchy shows containment relationships between the objects, all the objects belonging to a given parent object may have an operation-target flag indicating that these objects are non-target objects with respect to a particular operation if the parent object has an operation-target flag indicating a non-target status with respect to this particular operation.
Namely, if a tree structure is configured in such containment relationships, once a parent object is ascertained as a non-target object, all the child objects belonging to the parent objects are known to be non-target objects. A search does not have to be conducted for these child objects because they are known to be non-target objects. This eliminates a need for an unnecessary search to be conducted, resulting in an efficient search in the tree.
Whether the tree is structured in such containment relationships is a matter of design choice made at the time of creating application software.
Even if the tree does not represent containment relationships, however, a search can be more efficient in the present invention than in a related-art configuration. This is because each object represents a class object, and each class object may have many instance objects created thereupon. In a related art, when an object search is requested, such a search needs to be conducted for all the instance objects as well as for the class object. In the present invention, however, a search does not have to be conducted for the instance objects if the search of the class object indicates that the class object is a non-target object. That is, an unnecessary search for the instance objects which are known to be non-target objects can be eliminated.
In this manner, the present invention achieves an efficient search by attaching an operation-target flag to each object controlled in a form of an object tree.
Other objects and further features of the present invention will be apparent from the following detailed description when read in conjunction with the accompanying drawings.